package com.maketing.tender.service.Impl;

import com.maketing.tender.mapper.UserMapper;
import com.maketing.tender.pojo.User;
import com.maketing.tender.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
@Slf4j
class UserServiceImpl implements UserService {


    @Autowired
    private UserMapper userMapper;
    @Override
    public List<User> selectOne() {

        log.info("-------------------开始--------------------");
        try {
            List<User> users = userMapper.selectList(null);
            log.info("-----------成功-----------------");
            return  users;
        } catch (Exception e) {
            log.info("------------失败--------------------");
            return  new ArrayList<>();
        }

    }
}
